<!DOCTYPE html>
<html lang="zh-hans">
<head>
    <meta charset="UTF-8">
    <title>登录</title>
</head>
<body>
    <h2>登录</h2>
    {% if error_message %}
        <p style="color: red;">{{ error_message }}</p>
    {% endif %}
    <form method="post">
        {% csrf_token %}
        <label for="username">用户名:</label>
        <input type="text" id="username" name="username" required><br>
        <label for="password">密码:</label>
        <input type="password" id="password" name="password" required><br>
        <button type="submit">登录</button>
    </form>
    <p>还没有账号? <a href="{% url 'register' %}">注册</a></p>
</body>
</html>
